from utils.YamlHelper import YamlHelper

_yaml: YamlHelper | None = None


def init_config(yaml_path):
    global _yaml
    _yaml = YamlHelper()
    _yaml.read(yaml_path)

def set_config(*key, value, is_temp=False):
    _yaml.set(*key, value=str(value))
    if not is_temp:
        _yaml.write()

def get_config(*key, get_type=str):
    return _yaml.get(*key, get_type=get_type)

def is_new_config():
    return _yaml.is_new_yaml
